package dao;

import bean.Help;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import utils.JDBCUtils;

import java.util.List;

public class HelpDao {
    private static JdbcTemplate template = new JdbcTemplate(JDBCUtils.getDataSource());
    public static List<Help> getAllHelp(){
        String sql = "Select * from ad_help";
        List<Help> user = template.query(sql, new BeanPropertyRowMapper<>(Help.class));
        return user;
    }
}
